﻿using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using LeadThing.AbpZeroTemplate.Authorization.Roles.Dto;

namespace LeadThing.AbpZeroTemplate.Authorization.Roles
{
    /// <summary>
    /// Application service that is used by 'role management' page.
    /// </summary>
    public interface IRoleAppService : IApplicationService
    {
        #region 扩展方法
        /// <summary>
        /// 根据UserId获取角色信息
        /// </summary>
        /// <returns></returns>
        Task<RoleEditDto> GetRolesByUserId(GetRolesInput input);
        #endregion

        Task<ListResultDto<RoleListDto>> GetRoles(GetRolesInput input);

        Task<GetRoleForEditOutput> GetRoleForEdit(NullableIdDto input);

        Task CreateOrUpdateRole(CreateOrUpdateRoleInput input);

        Task DeleteRole(EntityDto input);
    }
}